<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .angel {
      position: absolute;
      top: 0;
      left: 0;
      width: 100px;
      height: 100px;
      background: url(angel.gif);
      background-size: 100px 100px;
    }
  </style>
</head>
<body>
  <div class="angel"></div>
  <!-- 使用固定定位或者时决定定位即可 -->
  <script>
    let angel = document.querySelector('.angel');
    document.addEventListener('mousemove', function(e) {
      angel.style.top = e.clientY + 'px';
      angel.style.left = e.clientX + 'px';
    });
  </script>
</body>
</html>